// pages/set/set.js
import {islogin} from '../../utils/islogin'
Page({
  
  blackList:function(){
    if(islogin()){
      islogin()
    }else{
      wx.navigateTo({
    url: '/pages/black/black',
  })
    }
    
  },
  problem:function(){
    if(islogin()){
      islogin()
    }else{
      wx.navigateTo({
      url: '/pages/problem/problem',
    })
    }
    
  },
  change:function(){
    if(islogin()){
      islogin()
    }else{
      wx.navigateTo({
      url: '/pages/change/change',
    })
    }
    
  },
  texts:function(){
    wx.navigateTo({
      url: '/pages/recommand/recommand',
    })
  },
  exitLogin:function(){
    wx.removeStorageSync('users')
    wx.switchTab({
      url: '/pages/person/person',
      success: function(e) {
        var page = getCurrentPages().pop();
        if (page == undefined || page == null) return;
        page.onLoad();
      }
    })
  }
  
})